//
//  TestViewController.m
//  HTP
//
//  Created by admin on 15/10/27.
//  Copyright © 2015年 nit. All rights reserved.
//

#import "TestViewController.h"
#import "SecondViewController.h"
@interface TestViewController ()

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    [self pushView];
    UIButton *test =  [[UIButton alloc] initWithFrame:CGRectMake(10, 200, 100, 100)];
    [test setBackgroundColor:[UIColor whiteColor]];
    [self.view addSubview:test];
    [test addTarget:self action:@selector(pushView) forControlEvents:UIControlEventTouchUpInside];
    // Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{

}
-(void)pushView{
    [[NSNotificationCenter defaultCenter] postNotificationName:ROOTGOTONEXTCONTROLLER object:[[SecondViewController alloc] init]];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
